package com.open.capacity.forum.feign;

import com.open.capacity.common.constant.ServiceNameConstant;
import com.open.capacity.common.web.Result;
import com.open.capacity.forum.feign.impl.FileServiceFallback;
import com.open.capacity.forum.feign.impl.UserCentServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Administrator
 */
@FeignClient(value = ServiceNameConstant.USER, fallbackFactory = UserCentServiceFallback.class, decode404 = true)
public interface UserCenterService {

    /**
     * 更新用户称号
     * @param userId
     * @param points 某个用户下载上传支援的次数
     * @param typeCode 模块
     * @return
     * @version 2021/3/3
     */
    @PutMapping("/title/updateTitleByUserIdAndPoints")
    Result updateTitleByUserIdAndPoints(@RequestParam("userId") Long userId, @RequestParam("points") Double points, @RequestParam("typeCode") String typeCode);
}